
mob
	Login(){
		..()
	}

	#ifdef DEBUG
	var/const/debugging	= TRUE
	#else
	var/const/debugging	= FALSE
	#endif


	var/tmp/iterations 	=	0
	var/tmp/rows		=	0
	var/tmp/columns		=	0
	var/time = 0

	verb/and_matrices(rows as num, columns as num, iterations as num){
		if(rows > 100 || columns > 100){
			usr << "Don't make the matrices to big."
			return
		}
		if(iterations > 1000000 || iterations < 1){
			usr << "Invalid number of iterations, must be between 1 and 1000000!"
			return
		}
		if(rows * columns <=0){
			usr << "Invalid value for columns/rows, must be > 1 and < 100!"
			return
		}



		usr << "Creating Matrices..."
		var/matrix/A = new(rows,columns,FALSE)
		var/matrix/B = new(rows,columns,TRUE)
		usr << "... Done"
		sleep(10)
		usr << "Starting Calculation..."
		spawn(1){
			time = world.timeofday
			for(var/i = iterations, i > 0, i--){
				A.and(B)
			}
			time = world.timeofday - time
			usr << "...Done!"
			usr << "[time/10] seconds calculating."
			usr << "Writing Logfile..."
			file("test.log") << "Size of the Matrices:	[rows]x[columns]"
			file("test.log") << "Iterations:	[iterations]"
			file("test.log") << "DEBUG_MODE:	[debugging]"
			file("test.log") << "Time spent in \[S\]:	[time/10]\n"
			usr << "...Done!"
		}
	}

	verb/clean_logfile(){
		if(fdel("test.log")) usr << "Logfile deleted."
		else usr << "Can't delete Logfile!"
	}

	verb/show_logfile(){
		usr << "[usr]'s Logfile:\n####################"
		usr << file2text("test.log")
		usr << "####################"
	}

	verb/function_test()
		#ifdef MODE_NUMBER


		#else
		var/matrix/A = new(3,3,FALSE)
		A.rows[1] = 5
		A.rows[2] = 2
		A.rows[3] = 5
		A.print()
		var/matrix/B = new(3,3,FALSE)
		B.rows[1] = 5
		B.rows[3] = 5
		#endif

		B.print()

		B.invertBits() //working
		B.print()

		A = A.and(B)
		A.print()




